#ifndef _mtk_calc_convert_h_
#define _mtk_calc_convert_h_

#include<stdio.h>
#include<string.h>
#include<stdlib.h>

#define debug_on 1

#if (debug_on==1)
#define debug(fmt,args...) printf(fmt,##args)
#else
#define debug(fmt,args...)
#endif

typedef struct cmd_s_tag {
    char value[4];
    struct cmd_s_tag *next;
} cmd;

typedef struct line_s_tag {
    char *content;
    char content_len;
    cmd *addr;
    cmd *data;
    int data_cnt;
    struct line_s_tag *next;
} line;

static int file_get_line(FILE *fp,char **s);
static void free_line_head(line *lhp);
static int file_put_lines(FILE *fp, line *lhp);
static void free_cmd(line *cmd);
static void line_fill_addr_data(line *lp);

#endif
